import net from "net";

const client = net.createConnection({
  host: "localhost",
  port: 3000,
});

client.on("data", (data) => {
  console.log(data.toString());
  // 结束
  // client.end();
});

client.on("end", () => {
  console.log("Disconnected from server");
});
